home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / comm / comm5 / awbmltym.lha / AWEBmailtoYAM / Install < prev    next >
Text File  |  1996-10-24  |  11KB  |  319 lines

  1. ; AWEBmailtoYAM V2 installer script ©1996 ALeX Kazik
  2. ; This is the greatest change from 1 to 2
  3.  
  4. (complete 0)
  5.  
  6. (set language
  7.     (askbool
  8.         (prompt  "\n\nWelcome to\n\nAWEBmailtoYAM V2 ©1996 ALeX Kazik\n\n\n\n\n\nWhich language do you prefer?")
  9.         (help    "")
  10.         (choices "English" "Deutsch")
  11.     )
  12. )
  13.  
  14. (if language (
  15. ;language ENGLISH
  16. (set #oldinstaller "Your installer is too old for this script. Please use at least V42.\nCurrent version while writing this script is V43.3, which is available from Aminet.")
  17. (set #msg-findyam  "Trying to find YAM...")
  18. (set #noyam        "Could not find YAM!")
  19. (set #awebdir-ask  "Where is AWeb installed?")
  20. (set #noaweb       "Could not find AWeb!")
  21. (set #delold-ask   "\n\nShould the old version deleted?\n\n\nThis is useful, because some files will not be used in the new version.")
  22. (set #editor-ask   "Which editor should be used?")
  23. (set #editor-help  (cat "If you choose YAM as Editor, every mailto: request will produce a empty mail with the correct recipient in YAM and tries to popup YAM.\n\n" @askchoice-help))
  24. (set #ed-choice2   "Another Editor")
  25. (set #ed-choice3   "YAM as Editor (see help!)")
  26. (set #editor2-ask  "Which type is your editor?")
  27. (set #ed2-choice0  "Simple (start: Xed <filename>)")
  28. (set #ed2-choice1  "Complex (start: more complex)")
  29. (set #editor2-help (cat "If the involking of your editor is more complex than 'XED filename' select Complex else Simple.\n\n" @askchoice-help))
  30. (set #edpath-ask1  "Please select the Editor (")
  31. (set #edpath-ask2  ").")
  32. (set #noeditor     "The Editor does not exists!")
  33. (set #edline-ask   "Please enter the start-line. See help.")
  34. (set #method-ask   "After a written letter, what should I do?")
  35. (set #meth-choice0 "Ask (Send/2Outgoing/Cancel)")
  36. (set #meth-choice1 "Move to the Outgoing folder")
  37. (set #meth-choice2 "Send it now (!)")
  38. (set #method-help  (cat "Ask - Will pop up a requester, what should he do: Send it now, move it to the Outgoing folder or nuke it.\nMove - Always move the message to the Outgoing folder.\nSend - Always (!) send the message now.\n\n" @askchoice-help))
  39. (set #create-ask   "\n\n\nNow the ARexx-Script will be created.")
  40. (set #create0      "Proceed")
  41. (set #create1      "Skip This Part")
  42. (set #readme-ask   "\n\n\nNow the ReadMe-File will be copied.")
  43. (set #awebver-ask  "Which version of AWeb do You have?")
  44. (set #msg-startaweb "Starting AWeb...")
  45. (set #msg12        '\n\n\nPlease go to AWeb and select the Menu "Settings/Change Settings...".\nSelect Page "Network 3: External Programms".\nSet the Cycle Type to "mailto:".\n\nEnter the Command "SYS:Rexxc/RX"\nand the Arguments "AWEBmailtoYAM.rexx "%s" "%s"".\n\nSave the config.')
  46. (set #msg15        '\n\n\nPlease go to AWeb and select the Menu "Settings/Network Settings...".\nSelect Page 2: "Programms".\nSet the Cycle Type to "mailto:".\n\nEnter the Command "SYS:Rexxc/RX"\nand the Arguments "AWEBmailtoYAM.rexx %e %n".\n\nSave the config.')
  47. (set #gift         "\n\nAWEBmailtoYAM is CARD/MAILWARE.\n\nSend me a postcard or a E-Mail.\n\n\nALeX Kazik\nStapenhorststr. 81\n33615 Bielefeld\nGermany\n\nakazik@TechFak.Uni-Bielefeld.DE")
  48. (set #exit         "\n\n\n\nThats all.\n\nHave fun.\n\n\n\nThanx to: Petra Struck - for a helping hand.")
  49. (set #stack-ask    "Please enter the stack-size of the editors.")
  50. (set #mustsync     "\n\n\nAttention!\n\n\nThe Editor must work syncron!\n\nThat means, if you start it from cli, it should NOT return immedatly.\n(The CygnusEd e.g. does that!)")
  51. )(
  52. ;language DEUTSCH
  53. (set #oldinstaller "Ihr Installer ist zu alt. Dieses Script benötigt mindestens V42.\nDie aktuelle Version -als das Script geschrieben wurde- ist V43.3. Sie befindet sich im Aminet.")
  54. (set #msg-findyam  "Versuche YAM zu finden...")
  55. (set #noyam        "Konnte YAM nicht finden!")
  56. (set #awebdir-ask  "Wo ist AWeb installiert?")
  57. (set #noaweb       "Konnte AWeb nicht finden!")
  58. (set #delold-ask   "\n\nSoll die alte Version gelöscht werden?\n\n\nDies ist nützlich, da einige Dateien nicht mehr benötigt werden.")
  59. (set #editor-ask   "Welcher Editor soll benutzt werden?")
  60. (set #editor-help  (cat "Wenn Sie YAM als Editor wählen, wird bei jedem mailto: request eine leere Nachricht mit Empfänger in YAM erzeugt und versucht, YAM nach vorne zu holen.\n\n" @askchoice-help))
  61. (set #ed-choice2   "Ein anderer Editor")
  62. (set #ed-choice3   "YAM als Editor (Help angucken!)")
  63. (set #editor2-ask  "Was für ein Typ ist Ihr Editor?")
  64. (set #ed2-choice0  "Einfach (Start: Xed <filename>)")
  65. (set #ed2-choice1  "Komplex (Start: schwieriger)")
  66. (set #editor2-help (cat "Wenn der Aufruf Ihres Editors komplexer ist, als 'XED filename', wähle Komplex, sonst Einfach.\n\n" @askchoice-help))
  67. (set #edpath-ask1  "Bitte wählen Sie den Editor (")
  68. (set #edpath-ask2  ").")
  69. (set #noeditor     "Der Editor existiert nicht!")
  70. (set #edline-ask   "Sorry, nur in Englisch, aber wichtig:\n\nPlease enter the start-line. See help.")
  71. (set #method-ask   "Was soll mit der geschriebenen Mail geschehen?")
  72. (set #meth-choice0 "Fragen (Senden/2Outgoing/Abbruch)")
  73. (set #meth-choice1 "In den Outgoing-Ordner verschieben")
  74. (set #meth-choice2 "Jetzt senden (!)")
  75. (set #method-help  (cat "Fragen - ruft einen Requester auf, und Sie werden gefragt, ob die Mail jetzt verschickt werden soll, in den Outgoing-Ordner verschoben werden soll, oder ob sie gar gelöscht werden soll.\nIn den Outgoing-Ordner schieben - immer.\nJetzt Senden - Sofort Senden !!\n\n" @askchoice-help))
  76. (set #create-ask   "\n\n\nNun wird das ARexx-Script erstellt.")
  77. (set #create0      "Weiter")
  78. (set #create1      "Diesen Teil überspringen")
  79. (set #readme-ask   "\n\n\nNun wird das ReadMe-File kopiert.")
  80. (set #awebver-ask  "Welche Version von AWeb haben Sie?")
  81. (set #msg-startaweb "Starte AWeb...")
  82. (set #msg12        '\n\n\nBitte gehen Sie jetzt zu AWeb und wählen Sie das Menu "Einstellungen/Einstellungen ändern...".\nWählen Sie die Seite "Netzwerk 3: Externe Programme".\nSetzen Sie den Typ auf "mailto:".\n\nGeben Sie den Befehl "SYS:Rexxc/RX"\nund die Argumente "AWEBmailtoYAM.rexx "%s" "%s"" ein.\n\nSpeichern Sie die Konfiguration.')
  83. (set #msg15        '\n\n\nBitte gehen Sie jetzt zu AWeb und wählen Sie das Menu "Einstellungen/Network Settings...".\nWählen Sie die Seite 2 "Programm".\nSetzen Sie den Typ auf "mailto:".\n\nGeben Sie den Befehl "SYS:Rexxc/RX"\nund die Argumente "AWEBmailtoYAM.rexx %e %n" ein.\n\nSpeichern Sie die Konfiguration.')
  84. (set #gift         "\n\nAWEBmailtoYAM ist CARD/MAILWARE.\n\n\nSchick mir eine Postkarte oder E-Mail.\n\nALeX Kazik\nStapenhorststr. 81\n33615 Bielefeld\nGermany\n\nakazik@TechFak.Uni-Bielefeld.DE")
  85. (set #exit         "\n\n\n\nDas wars.\n\nHab Spaß.\n\n\nDanke an: Petra Struck - für eine helfende Hand.")
  86. (set #stack-ask    "Bitte geben Sie die Stack-Größe ihres Editors ein.")
  87. (set #mustsync     "\n\n\nAchtung!\n\n\nDer Editor muß syncron arbeiten!\n\nDass heißt, wenn Sie den Editor vom CLI starten, darf er nicht sofort zurückkehen.\n(Der CygnusEd z.B. macht dies!)")
  88. ))
  89. (set #edline-help  (cat "Please enter the correct ARexx-Line to start Your editor.\n\nThe ARexx-Variable 'pubscreen' contains the name of AWeb's Pubscreen.\nThe Variable 'mailto' contains the recipient.\n\nHere now the three examples:\n\nEd:\n" (cat "»C:ED" ' "T:WriteMail.tmp" WINDOW "RAW:////MailTo: ' "'mailto'/CLOSE/SCREEN'pubscreen'" '"«') "\nCed:\n" (cat "»C:Ced" ' "T:WriteMail.tmp" -KEEPIO«') "\nXed:\n" (cat "»C:Xed" ' "T:WriteMail.tmp"«') "\n\n" @askstring-help))
  90.  
  91. (if (< @installer-version 2752512)
  92.     (abort #oldinstaller)
  93. )
  94.  
  95. (complete 7)
  96.  
  97. (working #msg-findyam)
  98. (run "SYS:System/RexxMast")
  99. (if (<> (run "SYS:Rexxc/rx scripts/FindYAM.rexx") 0)
  100.     (abort #noyam)
  101. )
  102.  
  103. (complete 14)
  104.  
  105. (set @destdir
  106.     (askdir
  107.         (prompt #awebdir-ask)
  108.         (help @askdir-help)
  109.         (default "WORK:AWeb")
  110.     )
  111. )
  112.  
  113. (if (AND (<> (exists (tackon @destdir "AWeb")) 1)
  114.          (<> (exists (tackon @destdir "AWeb-II")) 1))
  115.     (abort #noaweb)
  116. )
  117.  
  118. (complete 21)
  119.  
  120. (if (OR (OR (OR    (= (exists (tackon @destdir "AWEBmailtoYAM.readme.info")) 1)
  121.                         (= (exists (tackon @destdir "AWEBmailtoYAM.readme")) 1))
  122.                         (= (exists (tackon @destdir "AWEBmailtoYAM.rexx")) 1))
  123.                         (= (exists (tackon @destdir "AWEBmailtoYAM.ed")) 1))
  124.     (delete (tackon @destdir "AWEBmailtoYAM.(readme|rexx|ed|readme.info)")
  125.         (prompt #delold-ask)
  126.         (help "")
  127.         (confirm)
  128.         (optional force)
  129.         (infos)
  130.     )
  131. )
  132.  
  133. (complete 29)
  134.  
  135. (set stacksize 4096)
  136.  
  137. (set editor
  138.     (askchoice
  139.         (prompt #editor-ask)
  140.         (help #editor-help)
  141.         (choices "Commodores Ed" "Cygnus ED" #ed-choice2 #ed-choice3)
  142.         (default 0)
  143.     )
  144. )
  145.  
  146. (if (= editor 0)(
  147.     (set edname "Commodores Ed")
  148.     (set edpath "C:ED")
  149. ))
  150.  
  151. (if (= editor 1)(
  152.     (set edname "CygnusED")
  153.     (set edpath "C:CED")
  154.     (set stacksize 8000)
  155. ))
  156.  
  157. (complete 36)
  158.  
  159. (if (= editor 2)(
  160.     (message #mustsync)
  161.     (set editor2
  162.         (askchoice
  163.             (prompt #editor2-ask)
  164.             (help #editor2-help)
  165.             (choices #ed2-choice0 #ed2-choice1)
  166.             (default 0)
  167.         )
  168.     )
  169.     (if (= editor2 0)(
  170.         (set edname "CoustomEd")
  171.         (set edpath "C:CustomED")
  172.     )(
  173.         (set editor 4)
  174.         (set edpath "C:CustomED")
  175.     ))
  176. ))
  177.  
  178. (complete 43)
  179.  
  180. (if (< editor 3)(
  181.     (set edpath
  182.         (askfile
  183.             (prompt (cat #edpath-ask1 edname #edpath-ask2))
  184.             (help @askfile-help)
  185.             (default edpath)
  186.         )
  187.     )
  188.     (if (<> (exists edpath) 1)
  189.         (abort #noeditor)
  190.     )
  191. ))
  192.  
  193. (complete 50)
  194.  
  195. (if (= editor 0)
  196.     (set edline (cat edpath ' "T:WriteMail.tmp" WINDOW "RAW:0/15/640/465/MailTo: ' "'mailto'/CLOSE/SCREEN'pubscreen'" '"'))
  197. )
  198. (if (= editor 1)
  199.     (set edline (cat edpath ' "T:WriteMail.tmp" -KEEPIO'))
  200. )
  201. (if (> editor 1)(
  202.     (set edline (cat edpath ' "T:WriteMail.tmp"'))
  203.     (if (<> editor 3)
  204.         (set stacksize
  205.             (asknumber
  206.                 (prompt #Stack-ask)
  207.                 (help @asknumber-help)
  208.                 (default stacksize)
  209.             )
  210.         )
  211.     )
  212. ))
  213. (if (= editor 4)
  214.     (set edline
  215.         (askstring
  216.             (prompt #edline-ask)
  217.             (help #edline-help)
  218.             (default edline)
  219.         )
  220.     )
  221. )
  222.  
  223. (complete 57)
  224.  
  225. (if (<> editor 3)
  226.     (set method
  227.         (askchoice
  228.             (prompt #method-ask)
  229.             (help #method-help)
  230.             (choices #meth-choice0 #meth-choice2 #meth-choice1)
  231.             (default 0)
  232.         )
  233.     )
  234. )
  235.  
  236. (complete 64)
  237.  
  238. (if (= editor 3)(
  239.     (set conf
  240.         (askbool
  241.             (prompt #create-ask)
  242.             (help   "")
  243.             (choices #create0 #create1)
  244.         )
  245.     )
  246.     (if conf
  247.         (copyfiles
  248.             (source "scripts/Choice3.rexx")
  249.             (newname "AWEBmailtoYAM.rexx")
  250.             (dest @destdir)
  251.             (nogauge)
  252.         )
  253.     )
  254. )(
  255.     (set edline (cat "'" edline "'"))
  256.     (if (<> stacksize 4096)
  257.         (set edline (cat "'stack " stacksize "')\nCALL WRITELN(4," edline))
  258.     )
  259.     (textfile
  260.         (prompt #create-ask)
  261.         (help   "")
  262.         (dest (tackon @destdir "AWEBmailtoYAM.rexx"))
  263.         (include "scripts/Part1.rexx")
  264.         (append (cat "CALL WRITELN(4," edline ")\nmethod=" method "\n"))
  265.         (include "scripts/Part2.rexx")
  266.         (confirm)
  267.     )
  268. ))
  269.  
  270. (complete 71)
  271.  
  272. (set conf
  273.     (askbool
  274.         (prompt #readme-ask)
  275.         (help   "")
  276.         (choices #create0 #create1)
  277.     )
  278. )
  279. (if conf
  280.     (copyfiles
  281.         (source "AWEBmailtoYAM.readme")
  282.         (dest @destdir)
  283.         (nogauge)
  284.         (infos)
  285.     )
  286. )
  287.  
  288. (complete 79)
  289.  
  290. (set awebver
  291.     (askchoice
  292.         (prompt #awebver-ask)
  293.         (help @askchoice-help)
  294.         (choices "AWeb 1.2 (Demo)" "AWeb 1.5" "AWeb II")
  295.         (default 2)
  296.     )
  297. )
  298.  
  299. (complete 86)
  300.  
  301. (working #msg-startaweb)
  302. (if (= awebver 2)
  303.   (run (cat "SYS:Rexxc/rx scripts/StartAWEB-II.rexx " @destdir))
  304.   (run (cat "SYS:Rexxc/rx scripts/StartAWEB.rexx " @destdir))
  305. )
  306.  
  307. (complete 93)
  308.  
  309. (if (= awebver 0)
  310.     (message #msg12)
  311.     (message #msg15)
  312. )
  313.  
  314. (complete 100)
  315.  
  316. (message #exit)
  317.  
  318. (exit #gift (quiet))
  319.